<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<div class="navbar navbar-default navbar-fixed-top" role="navigation" >
     <div class="container"> 
         <div class="navbar-header">
             <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                 <span class="icon-bar"></span>
                 <span class="icon-bar"></span>
                 <span class="icon-bar"></span> 
             </button>
             <a href="#" class="navbar-brand"><img src="./img/logo.png " height="30" width="100"></a>
         </div>
         <div class="collapse navbar-collapse">
             <ul class="nav navbar-nav" style="left: 1000; text-align: center; margin: auto;">
                 <li><a href="events"><b>All Events</b></a></li>
                 <li><a href="northevents"><b>North</b></a></li>
                 <li><a href="southevents"><b>South</b></a></li>
                     <li class="dropdown">
                         <a href="#" class="dropdown-toggle" data-toggle="dropdown"><b>More</b>
                             <span class="glyphicon glyphicon-chevron-down"></span>
                         </a>
                         <ul class="dropdown-menu">
                             <li><a href="businessevents"><b>Large Business Events</b></a></li>
                             <li><a href="marketevents"><b>Traditional Market Events</b></a></li>
                             <li><a href="museumevents"><b>Museum Events</b></a></li>
                             <li><a href="parkevents"><b>Park Events</b></a></li>
                             <li><a href="stadiumevents"><b>Stadium Events</b></a></li>
                             <li><a href="theaterevents"><b>Theater Events</b></a></li>
                             <li><a href="touristsevents"><b>Tourist Attraction Events</b></a></li>
                             <li><a href="zoosevents"><b>Zoo Events</b></a></li>
                         </ul>
                    </li>
             </ul>
             <div class="col-sm-4 col-md-4">
		       <form class="navbar-form" role="search" action="searchevent" method="post">
		       <div class="input-group">
		           <input type="text" class="form-control" placeholder="Name or description" name="search">
		           <div class="input-group-btn">
		               <button class="btn btn-default" type="submit" style="padding: 9px 12px;"><i class="glyphicon glyphicon-search"></i></button>
		           </div>
		       </div>
		       </form>
		   	 </div>
             <ul class="nav navbar-nav navbar-right">
                 <li class="dropdown">
                     <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                         <span class="glyphicon glyphicon-user"></span> 
                         <strong><%= session.getAttribute("username") %></strong>
                         <span class="glyphicon glyphicon-chevron-down"></span>
                     </a>
                     <ul class="dropdown-menu">
                         <li>
                             <div class="navbar-login">
                                 <div class="row">
                                     <div class="col-lg-4">
                                         <p class="text-center">
                                             <span class="glyphicon glyphicon-user icon-size"></span>
                                         </p>
                                     </div>
                                     <div class="col-lg-8">
                                         <p class="text-left"><strong><%= session.getAttribute("name") %></strong></p>
                                         <p class="text-left small"><%= session.getAttribute("email") %></p>
                                     </div>
                                 </div>
                             </div>
                         </li>
                         <li class="divider"></li>
                         <li>
                             <div class="navbar-login navbar-login-session">
                                 <div class="row">
                                     <div class="col-lg-12">       
                                         <p class="text-left">
	                                         <form class="navbar-form" action="pupdateprofile" method="get">
										       <div class="input-group">
										           <div class="input-group-btn">
										               <button class="btn btn-primary btn-block btn-sm" type="submit"><i class="glyphicon glyphicon-th-list"></i> Update Profile</button>
										           </div>
										       </div>
										     </form>
										     <form class="navbar-form" action="pupdatepassword" method="get">
										       <div class="input-group">
										           <div class="input-group-btn">
										               <button class="btn btn-primary btn-block btn-sm" type="submit"><i class="glyphicon glyphicon-import"></i> Change Password</button>
										           </div>
										       </div>
										     </form>
										     <form class="navbar-form" action="myevents" method="get">
										       <div class="input-group">
										           <div class="input-group-btn">
										               <button class="btn btn-primary btn-block btn-sm" type="submit"><i class="glyphicon glyphicon-calendar"></i> My Events</button>
										           </div>
										       </div>
										     </form>
										     <c:if test="${sessionScope.isadmin==true}">
											     <form class="navbar-form" action="admin" method="get">
											       <div class="input-group">
											           <div class="input-group-btn">
											               <button class="btn btn-success btn-block btn-sm" type="submit"><i class="glyphicon glyphicon-calendar"></i> Admin</button>
											           </div>
											       </div>
											     </form>
										     </c:if>
                                        </p>
                                        <p>
                                        	<form class="navbar-form" action="logout" method="get">
										       <div class="input-group">
										           <div class="input-group-btn">
										               <button class="btn btn-danger btn-block" type="submit"><i class="glyphicon glyphicon-off"></i> Logout</button>
										           </div>
										       </div>
										    </form>
                                        	<!--<a href="logout" class="btn btn-danger btn-block"><span class="glyphicon glyphicon-off"></span> Log Out</a>  -->
                                        </p>
                                     </div>
                                 </div>
                             </div>
                         </li>
                     </ul>
                 </li>
             </ul>
         </div>
     </div>
 </div>